package C043;

/**
 * ClassName: C03
 * Package: C043
 * Description:
 *
 * @Author BCXJ
 * @Create 2025/2/6 21:50
 * @Version 1.0
 * @Since 1.0
 */
public class C03 {
    public static void main(String[] args) {

    }
    public static  boolean isPalindrome(int num) {
        if(num < 0) {
            return false;
        }
        int offset = 1;
        while(num / offset >= 10) {
            offset *= 10;
        }

        while(num != 0) {
            if(num / offset != num % 10) {
                return false;
            }
            num = (num % offset) / 10;
            offset /= 100;
        }

        return true;
    }
}
